<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen; http://apigen.org" />

	<title>Class Nette\Forms\SelectBox</title>

	<link rel="stylesheet" href="resources/style.css?v=2011071314" type="text/css" media="all" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Nette Framework API documentation" />
	<script type="text/javascript" src="resources/combined.js"></script>
	<script type="text/javascript" src="allclasses.js"></script>
</head>

<body>
<div id="left">
	<a href="allclasses.html">All Classes</a>

	<h3>Namespaces</h3>
	<ul>
		<li><a href="namespace-none.html">none</a>
		</li>
		<li><a href="namespace-Nette.html">Nette</a>
		</li>
		<li><a href="namespace-Nette.Application.html">Nette\Application</a>
		</li>
		<li><a href="namespace-Nette.Caching.html">Nette\Caching</a>
		</li>
		<li><a href="namespace-Nette.Collections.html">Nette\Collections</a>
		</li>
		<li><a href="namespace-Nette.Config.html">Nette\Config</a>
		</li>
		<li class="active"><a href="namespace-Nette.Forms.html">Nette\Forms</a>
		</li>
		<li><a href="namespace-Nette.IO.html">Nette\IO</a>
		</li>
		<li><a href="namespace-Nette.Loaders.html">Nette\Loaders</a>
		</li>
		<li><a href="namespace-Nette.Mail.html">Nette\Mail</a>
		</li>
		<li><a href="namespace-Nette.Reflection.html">Nette\Reflection</a>
		</li>
		<li><a href="namespace-Nette.Security.html">Nette\Security</a>
		</li>
		<li><a href="namespace-Nette.Templates.html">Nette\Templates</a>
		</li>
		<li><a href="namespace-Nette.Web.html">Nette\Web</a>
		</li>
		<li><a href="namespace-PHP.html">PHP</a>
		</li>
	</ul>

	<hr />

	<h3>Classes</h3>

	<ul>
		<li><a href="Nette.Forms.Button.html">Button</a></li>
		<li><a href="Nette.Forms.Checkbox.html">Checkbox</a></li>
		<li><a href="Nette.Forms.ConventionalRenderer.html">ConventionalRenderer</a></li>
		<li><a href="Nette.Forms.FileUpload.html">FileUpload</a></li>
		<li><a href="Nette.Forms.Form.html">Form</a></li>
		<li><a href="Nette.Forms.FormContainer.html">FormContainer</a></li>
		<li><a href="Nette.Forms.FormControl.html">FormControl</a></li>
		<li><a href="Nette.Forms.FormGroup.html">FormGroup</a></li>
		<li><a href="Nette.Forms.HiddenField.html">HiddenField</a></li>
		<li><a href="Nette.Forms.ImageButton.html">ImageButton</a></li>
		<li><a href="Nette.Forms.InstantClientScript.html">InstantClientScript</a></li>
		<li><a href="Nette.Forms.MultiSelectBox.html">MultiSelectBox</a></li>
		<li><a href="Nette.Forms.RadioList.html">RadioList</a></li>
		<li><a href="Nette.Forms.Rule.html">Rule</a></li>
		<li><a href="Nette.Forms.Rules.html">Rules</a></li>
		<li class="active"><a href="Nette.Forms.SelectBox.html">SelectBox</a></li>
		<li><a href="Nette.Forms.SubmitButton.html">SubmitButton</a></li>
		<li><a href="Nette.Forms.TextArea.html">TextArea</a></li>
		<li><a href="Nette.Forms.TextBase.html">TextBase</a></li>
		<li><a href="Nette.Forms.TextInput.html">TextInput</a></li>
	</ul>

	<h3>Interfaces</h3>

	<ul>
		<li><a href="Nette.Forms.IFormControl.html">IFormControl</a></li>
		<li><a href="Nette.Forms.IFormRenderer.html">IFormRenderer</a></li>
		<li><a href="Nette.Forms.INamingContainer.html">INamingContainer</a></li>
		<li><a href="Nette.Forms.ISubmitterControl.html">ISubmitterControl</a></li>
	</ul>

</div>

<div id="right">
	<form action="http://www.google.com/cse" id="search" onsubmit="if(this.q.value.indexOf('more:')==-1)this.q.value+=' more:api'">
		<input type="hidden" name="cx" value="011549293477758430224:vxofa9ufnhc" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" class="text" /><input type="submit" value="Search" />
	</form>

<div id="navigation">
	<ul>
		<li><a href="overview.html" title="Summary of all namespaces">Overview</a></li>
		<li><a href="namespace-Nette.Forms.html" title="Summary of Nette\Forms">Namespace</a></li>
		<li class="active">Class</li>
		<li><a href="elements.html">Elements</a></li>
	</ul>
</div>

<div id="content">
	<div id="classSummary">
		<p>namespace <a href="namespace-Nette.Forms.html">Nette\Forms</a></p>

		<h1>Class SelectBox</h1>

		<div class="classDescription">
		
<p>Select box control that allows single item selection.</p>

		</div>

		<dl class="tree">
			<dd style="padding-left:0px">
				<a href="Nette.Object.html">Nette\Object</a>
				
			</dd>
			<dd style="padding-left:30px">
				<img src="resources/inherit.gif" alt="extended by" />
				<a href="Nette.Component.html">Nette\Component</a>
				 implements <a href="Nette.IComponent.html">Nette\IComponent</a>
			</dd>
			<dd style="padding-left:60px">
				<img src="resources/inherit.gif" alt="extended by" />
				<a href="Nette.Forms.FormControl.html">Nette\Forms\FormControl</a>
				 implements <a href="Nette.Forms.IFormControl.html">IFormControl</a>
			</dd>
			<dd style="padding-left:90px">
				<img src="resources/inherit.gif" alt="extended by" />
<b>Nette\Forms\SelectBox</b>				
			</dd>
		</dl>

		<div>
			<h4>Direct Known Subclasses</h4>
			<a href="Nette.Forms.MultiSelectBox.html">MultiSelectBox</a>
		</div>


		<div class="classInfo">
			
				<b>Author:</b> David Grudl<br />
			<b>Located at</b> <a href="source-Forms.Controls.SelectBox.php.html#18">/Forms/Controls/SelectBox.php</a><br />
		</div>
	</div>


	<div id="methodSummary">
		<table class="summary">
		<caption>Method Summary</caption>
		<tr data-order="1 __construct" id="___construct">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#___construct">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#44" title="go to source code"><b>__construct</b></a>(
					string
					<var>$label</var> = <span class="php-keyword1">NULL</span>, 
					array
					
					<var>$items</var> = <span class="php-keyword1">NULL</span>, 
					int
					<var>$size</var> = <span class="php-keyword1">NULL</span>
			)</code>

			<div class="short">
				
			</div>

			<div class="detailed">
				


					<h4>Parameters</h4>
					<div class="smallList">
						<code>$label</code> string label<br />
						<code>$items</code> array items from which to choose<br />
						<code>$size</code> int number of rows that should be visible<br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="1 getValue" id="_getValue">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				mixed
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getValue">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#63" title="go to source code"><b>getValue</b></a>(
			)</code>

			<div class="short">
				
<p>Returns selected item key.</p>

			</div>

			<div class="detailed">
				
<p>Returns selected item key.</p>




					<h4>Returns</h4>
					<div class="smallList">mixed </div>


					<h4>Implementation of</h4>
					<div class="smallList"><code><a href="Nette.Forms.IFormControl.html#_getValue">IFormControl::getValue</a></code></div>
			</div>
			</td>
		</tr>
		<tr data-order="1 getRawValue" id="_getRawValue">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				mixed
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getRawValue">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#79" title="go to source code"><b>getRawValue</b></a>(
			)</code>

			<div class="short">
				
<p>Returns selected item key (not checked).</p>

			</div>

			<div class="detailed">
				
<p>Returns selected item key (not checked).</p>




					<h4>Returns</h4>
					<div class="smallList">mixed </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 skipFirst" id="_skipFirst">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Forms.SelectBox.html">SelectBox</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_skipFirst">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#90" title="go to source code"><b>skipFirst</b></a>(
					string
					<var>$item</var> = <span class="php-keyword1">NULL</span>
			)</code>

			<div class="short">
				
<p>Ignores the first item in select box.</p>

			</div>

			<div class="detailed">
				
<p>Ignores the first item in select box.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$item</code> string <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Forms.SelectBox.html">SelectBox</a> provides a fluent interface</div>


			</div>
			</td>
		</tr>
		<tr data-order="1 isFirstSkipped" id="_isFirstSkipped">
			<td align="right" width="1%"><code class="nowrap">
				final public 
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_isFirstSkipped">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#111" title="go to source code"><b>isFirstSkipped</b></a>(
			)</code>

			<div class="short">
				
<p>Is first item in select box ignored?</p>

			</div>

			<div class="detailed">
				
<p>Is first item in select box ignored?</p>




					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 areKeysUsed" id="_areKeysUsed">
			<td align="right" width="1%"><code class="nowrap">
				final public 
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_areKeysUsed">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#122" title="go to source code"><b>areKeysUsed</b></a>(
			)</code>

			<div class="short">
				
<p>Are the keys used?</p>

			</div>

			<div class="detailed">
				
<p>Are the keys used?</p>




					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 setItems" id="_setItems">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Forms.SelectBox.html">SelectBox</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_setItems">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#133" title="go to source code"><b>setItems</b></a>(
					array
					
					<var>$items</var>, 
					
					<var>$useKeys</var> = <span class="php-keyword1">true</span>
			)</code>

			<div class="short">
				
<p>Sets items from which to choose.</p>

			</div>

			<div class="detailed">
				
<p>Sets items from which to choose.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$items</code> array <br />
						<code>$useKeys</code> <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Forms.SelectBox.html">SelectBox</a> provides a fluent interface</div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getItems" id="_getItems">
			<td align="right" width="1%"><code class="nowrap">
				final public 
				array
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getItems">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#169" title="go to source code"><b>getItems</b></a>(
			)</code>

			<div class="short">
				
<p>Returns items from which to choose.</p>

			</div>

			<div class="detailed">
				
<p>Returns items from which to choose.</p>




					<h4>Returns</h4>
					<div class="smallList">array </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getSelectedItem" id="_getSelectedItem">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				string
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getSelectedItem">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#180" title="go to source code"><b>getSelectedItem</b></a>(
			)</code>

			<div class="short">
				
<p>Returns selected value.</p>

			</div>

			<div class="detailed">
				
<p>Returns selected value.</p>




					<h4>Returns</h4>
					<div class="smallList">string </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getControl" id="_getControl">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Web.Html.html">Nette\Web\Html</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getControl">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#197" title="go to source code"><b>getControl</b></a>(
			)</code>

			<div class="short">
				
<p>Generates control's HTML element.</p>

			</div>

			<div class="detailed">
				
<p>Generates control's HTML element.</p>




					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Web.Html.html">Nette\Web\Html</a> </div>


			</div>
			</td>
		</tr>
		<tr data-order="0 validateFilled" id="_validateFilled">
			<td align="right" width="1%"><code class="nowrap">
				 public static
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_validateFilled">#</a>
			<code class="nowrap">
				<a href="source-Forms.Controls.SelectBox.php.html#234" title="go to source code"><b>validateFilled</b></a>(
					<a href="Nette.Forms.IFormControl.html">IFormControl</a>
					
					<var>$control</var>
			)</code>

			<div class="short">
				
<p>Filled validator: has been any item selected?</p>

			</div>

			<div class="detailed">
				
<p>Filled validator: has been any item selected?</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$control</code> <a href="Nette.Forms.IFormControl.html">IFormControl</a> <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>

		</table>
	</div>


	<h2>Methods Inherited From <a href="Nette.Forms.FormControl.html#methodSummary">FormControl</a></h2>
	<div class="box"><code>
		<a href="Nette.Forms.FormControl.html#___construct">__construct()</a>, <a href="Nette.Forms.FormControl.html#_attached">attached()</a>, <a href="Nette.Forms.FormControl.html#_getForm">getForm()</a>, <a href="Nette.Forms.FormControl.html#_getHtmlName">getHtmlName()</a>, <a href="Nette.Forms.FormControl.html#_setHtmlId">setHtmlId()</a>, <a href="Nette.Forms.FormControl.html#_getHtmlId">getHtmlId()</a>, <a href="Nette.Forms.FormControl.html#_setOption">setOption()</a>, <a href="Nette.Forms.FormControl.html#_getOption">getOption()</a>, <a href="Nette.Forms.FormControl.html#_getOptions">getOptions()</a>, <a href="Nette.Forms.FormControl.html#_setTranslator">setTranslator()</a>, <a href="Nette.Forms.FormControl.html#_getTranslator">getTranslator()</a>, <a href="Nette.Forms.FormControl.html#_translate">translate()</a>, <a href="Nette.Forms.FormControl.html#_setValue">setValue()</a>, <a href="Nette.Forms.FormControl.html#_getValue">getValue()</a>, <a href="Nette.Forms.FormControl.html#_setDefaultValue">setDefaultValue()</a>, <a href="Nette.Forms.FormControl.html#_loadHttpData">loadHttpData()</a>, <a href="Nette.Forms.FormControl.html#_setDisabled">setDisabled()</a>, <a href="Nette.Forms.FormControl.html#_isDisabled">isDisabled()</a>, <a href="Nette.Forms.FormControl.html#_getControl">getControl()</a>, <a href="Nette.Forms.FormControl.html#_getLabel">getLabel()</a>, <a href="Nette.Forms.FormControl.html#_getControlPrototype">getControlPrototype()</a>, <a href="Nette.Forms.FormControl.html#_getLabelPrototype">getLabelPrototype()</a>, <a href="Nette.Forms.FormControl.html#_setRendered" class="deprecated">setRendered()</a>, <a href="Nette.Forms.FormControl.html#_isRendered" class="deprecated">isRendered()</a>, <a href="Nette.Forms.FormControl.html#_addRule">addRule()</a>, <a href="Nette.Forms.FormControl.html#_addCondition">addCondition()</a>, <a href="Nette.Forms.FormControl.html#_addConditionOn">addConditionOn()</a>, <a href="Nette.Forms.FormControl.html#_getRules">getRules()</a>, <a href="Nette.Forms.FormControl.html#_setRequired" class="deprecated">setRequired()</a>, <a href="Nette.Forms.FormControl.html#_isRequired" class="deprecated">isRequired()</a>, <a href="Nette.Forms.FormControl.html#_notifyRule">notifyRule()</a>, <a href="Nette.Forms.FormControl.html#_validateEqual">validateEqual()</a>, <a href="Nette.Forms.FormControl.html#_validateFilled">validateFilled()</a>, <a href="Nette.Forms.FormControl.html#_validateValid">validateValid()</a>, <a href="Nette.Forms.FormControl.html#_addError">addError()</a>, <a href="Nette.Forms.FormControl.html#_getErrors">getErrors()</a>, <a href="Nette.Forms.FormControl.html#_hasErrors">hasErrors()</a>, <a href="Nette.Forms.FormControl.html#_cleanErrors">cleanErrors()</a>
	</code></div>
	<h2>Methods Inherited From <a href="Nette.Component.html#methodSummary">Nette\Component</a></h2>
	<div class="box"><code>
		<a href="Nette.Component.html#___construct">__construct()</a>, <a href="Nette.Component.html#_lookup">lookup()</a>, <a href="Nette.Component.html#_lookupPath">lookupPath()</a>, <a href="Nette.Component.html#_monitor">monitor()</a>, <a href="Nette.Component.html#_unmonitor">unmonitor()</a>, <a href="Nette.Component.html#_attached">attached()</a>, <a href="Nette.Component.html#_detached">detached()</a>, <a href="Nette.Component.html#_getName">getName()</a>, <a href="Nette.Component.html#_getParent">getParent()</a>, <a href="Nette.Component.html#_setParent">setParent()</a>, <a href="Nette.Component.html#_validateParent">validateParent()</a>, <a href="Nette.Component.html#___clone">__clone()</a>, <a href="Nette.Component.html#___wakeup">__wakeup()</a>
	</code></div>
	<h2>Methods Inherited From <a href="Nette.Object.html#methodSummary">Nette\Object</a></h2>
	<div class="box"><code>
		<a href="Nette.Object.html#_getClass" class="deprecated">getClass()</a>, <a href="Nette.Object.html#_getReflection">getReflection()</a>, <a href="Nette.Object.html#___call">__call()</a>, <a href="Nette.Object.html#___callStatic">__callStatic()</a>, <a href="Nette.Object.html#_extensionMethod">extensionMethod()</a>, <a href="Nette.Object.html#___get">__get()</a>, <a href="Nette.Object.html#___set">__set()</a>, <a href="Nette.Object.html#___isset">__isset()</a>, <a href="Nette.Object.html#___unset">__unset()</a>
	</code></div>



	<h2>Constants Inherited From <a href="Nette.Component.html#constantSummary">Nette\Component</a></h2>
	<div class="box"><code>NAME_SEPARATOR</code></div>


	<div id="propertySummary">
		<table class="summary">
		<caption>Property Summary</caption>
		<tr data-order="allowed" id="$allowed">
			<td align="right" width="1%"><code class="nowrap">
				protected 
				array
			</code></td>

			<td width="1%"><var>$allowed</var></td>
			<td><pre><span class="php-keyword1">array</span> (
)</pre></td>
			<td> <a href="#$allowed" class="anchor">#</a></td>
		</tr>

		<tr data-order="rawValue" id="$rawValue">
			<td align="right" width="1%"><code class="nowrap">
				magic mixed
			</code></td>

			<td width="1%"><var>$rawValue</var></td>
			<td></td>
			<td> <a href="#$rawValue" class="anchor">#</a></td>
		</tr>
		<tr data-order="selectedItem" id="$selectedItem">
			<td align="right" width="1%"><code class="nowrap">
				magic mixed
			</code></td>

			<td width="1%"><var>$selectedItem</var></td>
			<td></td>
			<td> <a href="#$selectedItem" class="anchor">#</a></td>
		</tr>
		<tr data-order="firstSkipped" id="$firstSkipped">
			<td align="right" width="1%"><code class="nowrap">
				magic bool
			</code></td>

			<td width="1%"><var>$firstSkipped</var></td>
			<td></td>
			<td> <a href="#$firstSkipped" class="anchor">#</a></td>
		</tr>
		<tr data-order="items" id="$items">
			<td align="right" width="1%"><code class="nowrap">
				magic array
			</code></td>

			<td width="1%"><var>$items</var></td>
			<td></td>
			<td> <a href="#$items" class="anchor">#</a></td>
		</tr>
		</table>
	</div>

	<h2>Properties Inherited From <a href="Nette.Forms.FormControl.html#propertySummary">FormControl</a></h2>
	<div class="box"><code><var>$idMask</var>, <var>$caption</var>, <var>$value</var>, <var>$control</var>, <var>$label</var></code></div>

</div>

	<div id="footer">
		Nette Framework API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
</body>
</html>
